<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>用户登记</title>
  <link rel="shortcut icon" href="记事本_notepad.png" type="image/x-icon">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="component/elementUI/index.css">
  <link rel="stylesheet" href="style/wangeditor.css">
  <link rel="stylesheet" href="style/index.css">
  <style>
    .daon{
      margin-left: 550px !important;
    }
   .zhong{
    background-color: rgb(228, 228, 228);
    margin:20px 20px 0px 20px;
    margin-right: 20px;
    height: 100%;
   }
   .zhongn{
    margin-top: 20px;
    margin-left: 18px;
   }
   .xiangxi{  
    width: 300px;
   }
   .fangshi{
    width: 200px;
   }
   .anniu{
    margin-top: 5px;
    margin-left: 800px;
    padding-bottom: 20px;
   }
   .xia{
    background-color: rgb(228, 228, 228);
    margin:20px 20px;
    height: 610px;
    width: 98%;
   }
   .shuom{
    padding-top: 20px;
    float: left;
    width: 10%;
    height: 100%;
    margin-left: 40px;
   }  
  .ma{
    margin-left: 62px;
    width: 100px;
   }
   .xinxi{
    line-height: 35px;
    color: rgb(126, 125, 125);
    width: 10px;
    height: 10px !important;
   }
   p{
    text-align: center;
    color: rgb(141, 141, 141);
   }
   .shu{
    margin-top: 20px;
    padding-bottom: 50px;
    margin-left: 40px;
    width: 12%;
    float: left;
   }
   .sousk{
    width: 143px;
   }
   .shun{
    background-color: #fffcfc;
    margin-top: 23px;
    height: 466px;
    border: 1px solid #ffffff;
   }
   /* 查询 */
   .biao{
    margin-left: 10px;
    float: left;
    width: 72%;
    position: relative;
   }
   .riq{
    margin-top: 20px;
   }
   .biann{
    border: 1px solid #ebebeb;
    padding: 5px 20px;

    height: 470px;
   }
   .fenye{
    float: left;
    margin-left: 400px;
    position: relative;
    top:3%;
   }
   .canv{
    margin-top: 50px;
    margin-left: 10px;
   }
  </style>
</head>
<body>
  <div id="app">
    <div class="daoh">
      <!-- 导航 -->
    <el-menu
    :default-active="activeIndex2"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b">
    <el-menu-item index="1" class="daon">首页</el-menu-item>
    <el-submenu index="2">
      <template slot="title">活动</template>
      <el-menu-item index="2-1">投票</el-menu-item>
      <el-menu-item index="2-2">直播</el-menu-item>
      <el-menu-item index="2-3">调研</el-menu-item>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">客户</template>
      <el-menu-item index="3-1"><a href="登记楼宇信息.html">楼宇登记</a></el-menu-item>
      <el-menu-item index="3-2">用户登记</el-menu-item>
    </el-submenu>
      <el-menu-item index="4">商品管理</el-menu-item>
      <el-menu-item index="5">售后服务</el-menu-item>
      <el-menu-item index="6">对账系统</el-menu-item>
      <el-menu-item index="7" disabled>消息中心</el-menu-item>
      <el-menu-item index="8">订单管理</el-menu-item>
  </el-menu>
    </div>

    <div class="zhong">
      <el-form :inline="true" :model="form" class="demo-form-inline">
        <el-form-item label="用户姓名" class="zhongn" required>
          <el-input v-model="form.name" placeholder="用户姓名"></el-input>
        </el-form-item>
        <el-form-item label="用户电话" class="zhongn" required>
          <el-input v-model="form.pon" placeholder="用户电话"></el-input>
        </el-form-item>
        <el-form-item label="地址" class="zhongn" required>
          <el-cascader
          options="options" clearable
            placeholder="省/市/区"
            :options="options"
            v-model="value"
            :props="{ value: 'label' }">
          </el-cascader>
        </el-form-item>
        <el-form-item class="zhongn">
           <el-input v-model="form.jd" placeholder="街道"></el-input>
        </el-form-item>
        <el-form-item class="zhongn">
          <el-input v-model="form.seq" placeholder="社区"></el-input>
       </el-form-item>
       <el-form-item class="zhongn">
        <el-input v-model="form.xx" placeholder="详细地址" class="xiangxi"></el-input>
      </el-form-item>
      <el-form-item label="接入方式" class="zhongn" required>
        <el-select v-model="form.type" placeholder="接入方式" class="fangshi">
          <el-option label="扫码" value="扫码"></el-option>
          <el-option label="地推" value="地推"></el-option>
          <el-option label="好友邀请" value="好友邀请"></el-option>
        </el-select>
      </el-form-item>
        <el-form-item label="邀请人姓名" class="zhongn">
          <el-input v-model="form.yqr" placeholder="邀请人姓名"></el-input>
        </el-form-item>
        <el-form-item label="邀请码" class="zhongn">
          <el-input v-model="form.yqm" placeholder="邀请人邀请码"></el-input>
        </el-form-item>
        <el-form-item label="建议" class="zhongn">
          <el-input v-model="form.jy" placeholder="有何建议" class="xiangxi"></el-input>
        </el-form-item>
        <el-button type="primary" class="zhongn"  @click="ruku()">一键入库</el-button>
        <el-button type="success" class="zhongn">去识别</el-button>
        <el-button type="warning" class="zhongn">生成二维码</el-button>
      </el-form>
      
    </div>

    <!-- 说明 -->
    <div class="xia">
      <div class="shuom" >
        <div class="ma" id="ma"></div>
        <!-- <img id="qrcode-image" alt="QRCode Image" style="display:none;"> -->
        <!-- <img src="商铺码.png" alt="" class="ma"> -->
        <p><i class="el-icon-info"></i>说明</p>
        <span class="xinxi">
          用户可以通过扫描商铺码
          进入商铺社区，或通过自行填
          写信息，或联系地推员帮助信息
          录入生成二维码后扫码进入社区。<br>
          注意一个门牌只能绑定两个人，请正确填写信息，识别成功后进入社区，
          请您耐心等待审核通知
        </span>
        <el-button type="primary" plain class="canv" id="convert-btn" @click="downloadQRCode()">去下载打印商家码</el-button>
      </div>
      <div class="shu">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-input v-model="formInline.user" placeholder="用户搜索" class="sousk"></el-input>
            <el-button type="primary">搜索
        </el-form>
        </el-button>
        <div class="shun">
           <el-tree
            :data="data"
            node-key="id"
            default-expand-all
            @node-drag-start="handleDragStart"
            @node-drag-enter="handleDragEnter"
            @node-drag-leave="handleDragLeave"
            @node-drag-over="handleDragOver"
            @node-drag-end="handleDragEnd"
            @node-drop="handleDrop"
            draggable
            :allow-drop="allowDrop"
            :allow-drag="allowDrag">
           </el-tree>
        </div>
      </div>
      
      <div class="biao">
        <div>
          <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item label="用户姓名" class="zhongn">
            <el-input v-model="formInline.name" placeholder="用户姓名"></el-input>
          </el-form-item>
          <el-form-item label="区域" class="zhongn">
            <el-select v-model="formInline.qy" placeholder="区域" class="quy">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
            <el-select v-model="formInline.jd" placeholder="街道" class="quy">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
            <el-select v-model="formInline.jf" placeholder="积分" class="quy">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-form-item>
            <el-button type="primary" class="riq">查询
        </div>
        


        <el-table
          class="biann" border
          ref="filterTable"
          :data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)"
          style="width: 100%">
          <el-table-column
            prop="date"
            label="日期"
            sortable
            width="180"
            column-key="date"
            :filters="[{text: '2016-05-01', value: '2016-05-01'}, {text: '2016-05-02', value: '2016-05-02'}, {text: '2016-05-03', value: '2016-05-03'}, {text: '2016-05-04', value: '2016-05-04'}]"
            :filter-method="filterHandler">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="100">
          </el-table-column>
          <el-table-column
            prop="pon"
            label="电话"
            width="120">
          </el-table-column>
          <el-table-column
            prop="jf"
            label="积分"
            min-width="50">
          </el-table-column>
          <el-table-column
            prop="address"
            label="地址"
            min-width="320"
           :formatter="formatter">
          </el-table-column>
          <el-table-column
            prop="type"
            label="性质"
            width="130">
          </el-table-column>
          <el-table-column
            prop="yqr"
            label="邀请人"
            width="100">
          </el-table-column>
          <el-table-column
            prop="zhuang"
            label="状态"
            width="90"
            :filters="[{ text: '识别成功', value: '识别成功' }, { text: '未识别', value: '未识别' }]"
            :filter-method="filterTag"
            filter-placement="bottom-end">
        <template slot-scope="scope">
          <el-tag
            :type="scope.row.tag === '未识别' ? 'primary' : 'success'"
            disable-transitions>{{scope.row.zhuang}}</el-tag>
       </template>
      </el-table-column>
      <el-table-column
      label="操作"
      width="140">
      <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small" class="shibie">去识别</el-button>
          <el-button type="text" size="small" @click="bianji(scope.row)">编辑</el-button>
      </template>
    </el-table-column>
    </el-table>
      </div>
      <el-pagination
    class="fenye"
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-sizes="[10, 20, 30, 40]"
    :page-size="pagesize"
    layout="total, sizes, prev, pager, next"
    :total="tableData.length">
  </el-pagination>
    </div>
  </div>
</body>

<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script type="text/javascript" src="utils/wangeditor.js"></script>
<script type="text/javascript" src="utils/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="jquery.qrcode.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/print-this@2.1.5/dist/printThis.min.js"></script>
<script src="./js/printThis.js"></script>
<script src="./js/printThis.jquery.json"></script>

<script type="text/javascript" src="utils/jquery.cookie.js"></script>
<script type="text/javascript" src="utils/vue.min.js"></script>
<script type="text/javascript" src="utils/vuex.min.js"></script>
<script type="text/javascript" src="component/elementUI/index.js"></script>
<script type="text/javascript" src="component/component.js"></script>
<script type="text/javascript" src="config/config.js"></script>
<script type="text/javascript" src="utils/FileSaver.min.js"></script>
<script type="text/javascript" src="utils/FileSaver.js"></script>
<script type="text/javascript" src="utils/xlsx.full.min.js"></script>
<script type="text/javascript" src="utils/xlsx.core.min.js"></script>
<script type="text/javascript" src="utils/compressor.js"></script>
<script type="text/javascript" src="utils/ID_Validity.js"></script>
<script type="text/javascript" src="utils/utils.js"></script>
<script>
    //    * 获取日期 年-月-日 时:分:秒
//  * @returns {}
//  */
function getYMDHMSDate(oDate) {
    if (oDate != null) {
       var data = new Date(oDate);
    } else {
        var data = new Date();
    }
    let m = data.getMonth() + 1;
    let d = data.getDate();
    let H = data.getHours();
    let M = data.getMinutes();
    let S = data.getSeconds();
    if (m < 10) {
        m = "0" + m
    }
    if (d < 10) {
       d = "0" + d
    }
    if (H < 10) {
        H = "0" + H
    }
    if (M < 10) {
       M = "0" + M
    }
    if (S < 10) {
        S = "0" + S
    }
    return data.getFullYear() + "-" + m + "-" + d + " " + H + ":" + M + ":" + S}
  
    function getQueryObject(url) {
    url = url == null ? window.location.href : url
    const search = url.substring(url.lastIndexOf('?') + 1)
    const obj = {}
    const reg = /([^?&=]+)=([^?&=]*)/g
    search.replace(reg, (rs, $1, $2) => {
      const name = decodeURIComponent($1)
      let val = decodeURIComponent($2)
      val = String(val)
      obj[name] = val
      return rs
    })
    return obj
}



  var a = new Vue({
    el: '#app',
    data() {
      return{
        js:{
          name:'',
          pon:'',
          id:'',
        },
        options: [{}],
        pagesize:7, // 每页的数据条数
        currentPage: 1,
        activeIndex2: '3-2',
        value:[],
        form: {
          name: '',
          jf:'',
          pon:'',
          date: '',
          delivery: false,
          type: [],
          jd:'',
          xx:'',
          seq:'',
          address:'',
          zhuang: '',
          sheng:'',
          shi:'',
          qu:''
        },
        add:[],
        tableData: [{
          type: [],
          date: '',
          name: '',
          pon:'',
          jf:'',
          jd:'',
          xx:'',
          seq:'',
          address:'',
          yqr:'',
          yqm:'',
          jy: '',
          zhuang: ''
        }],
        formInline: {
          name:'',
          sou:'',
          jf: '',
        },
        data: [{
          id: 1,
          label: '一级 1',
          children: [{
            id: 4,
            label: '二级 1-1',
            children: [{
              id: 9,
              label: '三级 1-1-1'
            }, {
              id: 10,
              label: '三级 1-1-2'
            }]
          }]
        }, {
          id: 2,
          label: '一级 2',
          children: [{
            id: 5,
            label: '二级 2-1'
          }, {
            id: 6,
            label: '二级 2-2'
          }]
        }, {
          id: 3,
          label: '一级 3',
          children: [{
            id: 7,
            label: '二级 3-1'
          }, {
            id: 8,
            label: '二级 3-2',
            children: [{
             id: 11,
              label: '三级 3-2-1'
            }, {
              id: 12,
              label: '三级 3-2-2'
            }, {
              id: 13,
              label: '三级 3-2-3'
            }]
          }]
        }],
      }
    },
    mounted(){
      this.getList()
      this.js = getQueryObject()
      console.log(this.js,'js');
    
      $.ajax({
      url:'./city.json',
      type: 'get',
      success:(a) =>{       //  成功返回值     
           this.options = a
          },
          error:(err)=>{          //  失败调用，200交互成功，500服务器出问题了，304权限不够，404不存在，405 get/post请求问题
            console.log(err);
          }
      })

      // 二维码
    //   $(document).ready(function() {
    //     someFunction((result) => {
    // // 在这里，this 将保持外部作用域中的值
    //     if (this.js && this.js.id && this.js.name && this.js.pon) {
    //         var qrcodeData = `https://marketing.xiaokanglongjiang.com/dist/shequyingxing/shou.html?id=${encodeURIComponent(this.js.id)}&name=${encodeURIComponent(this.js.name)}&pon=${encodeURIComponent(this.js.pon)}`;
    //         // 使用 qrcodeData ...
    //     } else {
    //         console.error('js 对象或属性未定义');
    //     }})
    //         $('#ma').qrcode({
    //             width: 120,
    //             height: 120,
    //             text: qrcodeData,
    //             background: "#ffffff",
    //             foreground: "#000000",
    //             correctLevel: QRCode.CorrectLevel.H
    //         });
 
    //         $('#convert-btn').click(function() {
    //             // 获取二维码的 canvas 元素
    //             var canvas = $('#ma canvas')[0];
    //             // 将 canvas 内容转换为 base64 编码的 URL
    //             var imgData = canvas.toDataURL('image/png');
    //             // // 设置到 img 标签的 src 属性中
    //             // $('#qrcode-image').attr('src', imgData);
    //             // // 显示图片
    //             // $('#qrcode-image').show();

    //             // 创建一个 img 元素来显示二维码（可选）
    //             var img = $('<img>').attr('src', imgData).css('display', 'none');
    //             // 将 img 元素添加到 DOM 中（但在这里我们选择不显示它）
    //             // $('body').append(img); // 如果不需要显示，可以不添加这一行
 
    //             // 可选：创建一个下载链接
    //             var downloadLink = $('<a>')
    //                 .attr('href', imgData)
    //                 .attr('download', 'ma.png')
    //                 .text('Download QR Code');
    //             $('body').append(downloadLink);
    //             downloadLink[0].click();
 
    //             // 移除下载的链接和（可选的）img 元素
    //             downloadLink.remove();
    //             // 如果添加了 img 元素到 DOM 中并且现在想要移除它，也需要执行 img.remove();
    //         });
    //     });


      // 这个
      // $(`#ma`).qrcode({
      //   width:60, //宽度
      //   height:60, //高度
      //   text:`https://marketing.xiaokanglongjiang.com/dist/shequyingxing/shou.html?id=${encodeURIComponent(this.js.id)}&name=${encodeURIComponent(this.js.name)}&pon=${encodeURIComponent(this.js.pon)}`, //内容
      //   typeNumber:-1, //计算模
      //   correctLevel:2, //二维码纠错级别
      //   background:"#fff", //背景额色
      //   foreground:'#898888' //二维码额色
      // })

      
 
      //       $('#convert-btn').click(function() {
//               const pElement = document.getElementById('ma'); // 替换为指定的 DOM 元素 ID
//               const copiedElement = pElement.cloneNode(true);
// window.print(copiedElement);

// // 在打印事件中进行设置
// window.addEventListener('beforeprint', () => {
//   element.style.display = 'block'; // 确保元素显示
// });

// window.addEventListener('afterprint', () => {
//   element.style.display = 'none'; // 打印后恢复元素的原始显示状态
// });

//               window.print()


// 这个
// $('#ma').printThis({
//   importCSS: true, // 是否导入 CSS
//   loadCSS: "", // 加载的 CSS 文件路径
//   pageTitle: "", // 页面标题
//   removeInline: false, // 是否移除内联样式
// });



                // 获取二维码的 canvas 元素
              //   var canvas = $('#ma canvas')[0];
              //   // 将 canvas 内容转换为 base64 编码的 URL
              // console.log('aaa-click',canvas)
              // var imgData = canvas.toDataURL('image/png');
              //   // // 设置到 img 标签的 src 属性中
              //   // $('#qrcode-image').attr('src', imgData);
              //   // // 显示图片
              //   // $('#qrcode-image').show();

              //   // 创建一个 img 元素来显示二维码（可选）
              //   var img = $('<img>').attr('src', imgData).css('display', 'none');
              //   // 将 img 元素添加到 DOM 中（但在这里我们选择不显示它）
              //   // $('body').append(img); // 如果不需要显示，可以不添加这一行
 
              //   // 可选：创建一个下载链接
              //   var downloadLink = $('<a>')
              //       .attr('href', imgData)
              //       .attr('download', 'ma.png')
              //       .text('Download QR Code');
              //   $('body').append(downloadLink);
              //   downloadLink[0].click();
 
              //   // 移除下载的链接和（可选的）img 元素
              //   downloadLink.remove();
                // 如果添加了 img 元素到 DOM 中并且现在想要移除它，也需要执行 img.remove();
            // });

    //   // 获取canvas Dom
    // const canvas = document.getElementById("ma");
    // // 创建画笔
    // const ctx = canvas.getContext('2d')
    // // 设置矩形
    // ctx.fillRect(0, 0, 500, 500)
    
    // // 创建img
    // const img = document.createElement("img")
    // // 设置宽高
    // img.width = canvas.width
    // img.height = canvas.height

    // // 使用 toDataURL 将canvas转换成base64格式的图片
    // img.src = canvas.toDataURL()
    // // 追加到body中 页面显示
    // document.body.appendChild(img)


    },
    methods: {
      
      downloadQRCode() {

          const name = encodeURIComponent(this.js.name);
          const pon = encodeURIComponent(this.js.pon);
          const id = encodeURIComponent(this.js.id);
          const queryString = `?name=${name}&pon=${pon}&id=${id}`;
          console.log(queryString);
          
          // window.open('https://www.google.com' + window.location.href + './打印.html?' + queryString);
          window.location.href = './打印.html?' + queryString;




        //  // 获取二维码的 canvas 元素
        //  var canvas = $("#ma canvas")[0];
        //  // 将 canvas 内容转换为 base64 编码的 URL
        //  console.log("aaa-click", canvas);
        //  var imgData = canvas.toDataURL("image/png");
        //  // 创建一个 img 元素来显示二维码（可选）
        //  var img = $("<img>").attr("src", imgData).css("display", "none");
        //  // 可选：创建一个下载链接
        //  var downloadLink = $("<a>").attr("href", imgData).attr("download", "ma.png").text("Download QR Code");
        //  $("body").append(downloadLink);
        //  downloadLink[0].click();
        //  // 移除下载的链接和（可选的）img 元素
        //  downloadLink.remove();
        //  // 如果添加了 img 元素到 DOM 中并且现在想要移除它，也需要执行 img.remove();
        },


      xiazai(){
      //   const a = document.createElement('a') // 动态创建a标签
      //   a.download = '二维码下载' // 下载名称
      //   a.href = img.src     // 设置下载路径
      },



      getList(){
        $.ajax({
          headers:{
            'Content-Type':'application/x-www-form-urlencoded',
            Accesstoken:'eyJraWQiOiJteS1rZXktaWQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxNTA0NjAwNjEyMCIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsImlzcyI6ImF1dGguZXhhbXBsZS5jb20iLCJVc2VySW5mbyI6eyJVc2VyTmFtZSI6IjE1MDQ2MDA2MTIwIn0sImV4cCI6MTczMTM3ODEwMSwiaWF0IjoxNzMxMzc0NTAxLCJqdGkiOiI3ZGQ3YTI1NC1hZjI4LTRjZjUtYmZjNi0wMzdiZGVmZDlmNjQifQ.ZYwrr1ETpJCNTy55VObFrmyzYGmhri95soouGqGmVpweHMHsE2j7buSdCJDP0mxlNnhu4e8Kk0pK8Sa4pHAddT8RVD5PXl2I2gCDyzCcI5hSmxbiuNETTJrXqAtTw4WVCHWW4H3VHHfC1RdH0WRM0dfWalUrZ8qUPDRQcl0BXiiZ0wAQ8BW3LoZlFPddg5ShPOt6BpSBg71oo_pGAMY3QxY6rd5ibh4R347e2cc8xVf2OMAKFVXtjX_yZFKIW8A_MU0InvCJGzXcNT8jUR2xkTAsOIAp-OYO_Tsppn-pKXgFvRTvBQHN-Yx9BH74QqXH6mun3Kdcky0q31Nt3WcV0w',
          },
          url: 'https://service2.ediblefungus.cn/zhaobo/generalBusiness/generalQueryByTableNameWithOriginal',
            type: 'POST',
            data:{       
              RowAmount: 7,            //  传给后台的参数
              Data:'usertable',
              Condition:"zhuang ='未识别'"
          },
          success:(usertable)=>{
            this.tableData = usertable
          },
       })
      },
      handleSelect(key, keyPath) {
        console.log(key, keyPath)
      },
      handleDragStart(node, ev) {
        console.log('drag start', node);
      },
      handleDragEnter(draggingNode, dropNode, ev) {
        console.log('tree drag enter: ', dropNode.label);
      },
      handleDragLeave(draggingNode, dropNode, ev) {
        console.log('tree drag leave: ', dropNode.label);
      },
      handleDragOver(draggingNode, dropNode, ev) {
        console.log('tree drag over: ', dropNode.label);
      },
      handleDragEnd(draggingNode, dropNode, dropType, ev) {
        console.log('tree drag end: ', dropNode && dropNode.label, dropType);
      },
      handleDrop(draggingNode, dropNode, dropType, ev) {
        console.log('tree drop: ', dropNode.label, dropType);
      },
      allowDrop(draggingNode, dropNode, type) {
        if (dropNode.data.label === '二级 3-1') {
          return type !== 'inner';
        } else {
          return true;
        }
      },
      allowDrag(draggingNode) {
        return draggingNode.data.label.indexOf('三级 3-2-2') === -1;
      },
      // 表格
      filterHandler(value, row, column) {
        const property = column['property'];
        return row[property] === value;
      },
      formatter(row, column) {
        return row.address;
      },
      filterTag(value, row) {
        return row.tag === value;
      },
      // 分页
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.pagesize = val
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.currentPage = val
      },
      handleClick(row) {

        row.zhuang = '识别成功'
        console.log(row,'row');


         // 查到修改数据
         $.ajax({
          headers:{
            'Content-Type':'application/x-www-form-urlencoded',
            Accesstoken:'eyJraWQiOiJteS1rZXktaWQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxNTA0NjAwNjEyMCIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsImlzcyI6ImF1dGguZXhhbXBsZS5jb20iLCJVc2VySW5mbyI6eyJVc2VyTmFtZSI6IjE1MDQ2MDA2MTIwIn0sImV4cCI6MTczMTczMzY1NiwiaWF0IjoxNzMxNzMwMDU2LCJqdGkiOiI4YjUzMjhjOC0wYzhmLTQzZTktOTY2MC02MGJmYTQzMmZmNjYifQ.jfQrRyqNzFWvhLKTuKV-v-8Q5PkQBmrWuFWS3SYDcNLTILE78Gmuxty9KNHjc7wq2gJCRRGHofwyNtlwVShOgp-bPULw9NcCZXq3MHhMqUnXeB98S1m1HO3A7b3NJ987XtQE7ZK672mNsfY6p6YdMeZQYLq7rDAdR6hMFmFbiOjRcCAYuFzgjeSJ8YU6aeBl73oE6DxlbdW3UifbqMcI1uYQK_npgW5Lir5-byoJXR_jCXvK_6f9zL8DulJapSx0jDiKJlge1CYHZQTQ_LR1yShUOdCwD_MFjx2EiN0rE6N2CMcK_vwBx-yNUwypRGkSiEl3XLxTB9yAWgwKaZ2A1Q',
          },
          url: 'https://service2.ediblefungus.cn/zhaobo/generalBusiness/generalQueryByTableNameWithOriginal',
            type: 'POST',
            data:{       
              RowAmount: 10,            //  传给后台的参数
              Data:'usertable',
              Condition:"id='"+row.id+"'"
          },
          success:(row)=>{
            console.log(row[0].zhuang);
            row[0].zhuang = '识别成功'
            console.log(row[0].zhuang);
            console.log(row,'rowqqq');
            
              // 修改提交
              $.ajax({
                    headers:{                 // 请求头，ajax封装默认请求头一般可以不写
                      AccessToken:'eyJraWQiOiJteS1rZXktaWQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxNTA0NjAwNjEyMCIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsImlzcyI6ImF1dGguZXhhbXBsZS5jb20iLCJVc2VySW5mbyI6eyJVc2VyTmFtZSI6IjE1MDQ2MDA2MTIwIn0sImV4cCI6MTczMTczMzY1NiwiaWF0IjoxNzMxNzMwMDU2LCJqdGkiOiI4YjUzMjhjOC0wYzhmLTQzZTktOTY2MC02MGJmYTQzMmZmNjYifQ.jfQrRyqNzFWvhLKTuKV-v-8Q5PkQBmrWuFWS3SYDcNLTILE78Gmuxty9KNHjc7wq2gJCRRGHofwyNtlwVShOgp-bPULw9NcCZXq3MHhMqUnXeB98S1m1HO3A7b3NJ987XtQE7ZK672mNsfY6p6YdMeZQYLq7rDAdR6hMFmFbiOjRcCAYuFzgjeSJ8YU6aeBl73oE6DxlbdW3UifbqMcI1uYQK_npgW5Lir5-byoJXR_jCXvK_6f9zL8DulJapSx0jDiKJlge1CYHZQTQ_LR1yShUOdCwD_MFjx2EiN0rE6N2CMcK_vwBx-yNUwypRGkSiEl3XLxTB9yAWgwKaZ2A1Q',
                      'Content-Type':'application/x-www-form-urlencoded',
                    },
                    url: 'https://service2.ediblefungus.cn/zhaobo/generalBusiness/generalSave',
                    type: 'POST',
                    data:{                   //  传给后台的参数
                      Data:JSON.stringify({"Modify":{"usertable":row}}) ,
                    },
                    success:(row)=>{
                      console.log(row);
                      
                      if (row.Status =='success') {
                        this.getList();//
                      }
                    },
                })
          },
        })
      

        console.log(row,'zeh');
      },
      bianji(row){
        },
      ruku(){
        this.form.sheng = this.value[0]
        this.form.shi = this.value[1]
        this.form.qu = this.value[2]
        this.form.jf = 0
        this.form.date = getYMDHMSDate()
        this.form.zhuang = '未识别'
        this.form.address = this.form.sheng + this.form.shi + this.form.qu + this.form.jd + this.form.seq + this.form.xx 
        this.add = [];
        this.add.push(this.form)

        
        $.ajax({
          headers:{
            'Content-Type':'application/x-www-form-urlencoded',
            Accesstoken:'eyJraWQiOiJteS1rZXktaWQiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxNTA0NjAwNjEyMCIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsImlzcyI6ImF1dGguZXhhbXBsZS5jb20iLCJVc2VySW5mbyI6eyJVc2VyTmFtZSI6IjE1MDQ2MDA2MTIwIn0sImV4cCI6MTczMTQ2NTc5MiwiaWF0IjoxNzMxNDYyMTkyLCJqdGkiOiJmMzE4MzY3NS0xMzA1LTQ0ZDQtYmY4My01YjViYzk3MDRkMTUifQ.JhHeMyjUJ0xdpCGIvGROFATYCyRcQWwOBTOR-Zj4gfWf8NXq0H8j1KWL7rPO8Y4AEJ-36LqYpLmr8kmCMbhSfP7cbGJ9kKM9VoEbW93nu6WLIClsfC8_q4G7fkdnytj33LmIbisXwiCsX2k4-qgbGiN9HV-7qmffJd3HhItH4eeb7RQTahUSscnRNLBc_BL80QYyoW-z2F6Fq2ORP_GYWrsPM6IMP5ZwuiAh1Q95Ho-A44-91Szo-6zsfJLt_YHi8yNjnXJQXtAtt7Q8Zxkh_tDtWw_Hc99FhqPrZnWIXee1BbJA_pxp9-zihXdPSbfuabu86epxERASsC90_RUP2g',
          },
          url: 'https://service2.ediblefungus.cn/zhaobo/generalBusiness/generalSave',
            type: 'POST',
            data:{   
            Data:JSON.stringify({"Add":{"usertable": this.add}}) ,
          },
          success:(add)=>{
            this.getList()
            
          },
          error:(err)=>{          //  失败调用，200交互成功，500服务器出问题了，304权限不够，404不存在，405 get/post请求问题
            console.log(err);
          },
          dataType:'json' //转数据格式  
        })
      },
  },
  })
</script>
</html>